package com.gitee.huanminabc.db_freedom.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.huanminabc.db_freedom.enums.DelEnum;
import com.gitee.huanminabc.db_freedom.enums.EducationEnum;
import com.gitee.huanminabc.db_freedom.enums.SexEnum;
import com.gitee.huanminabc.db_freedom.enums.UserStatusEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author huanmin
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_user")
public class UserEntity implements Serializable{
    private static final long serialVersionUID = 1L;


	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	@TableField( "account")
	private String account;

	@TableField( "nickName")
	private String nickName;

	@TableField( "password")
	private String password;

	@TableField( "`status`")
	private UserStatusEnum status;

	@TableField( "email")
	private String email;

	@TableField( "phoneNumber")
	private String phoneNumber;

	@TableField( "`sex`")
	private SexEnum sex;

	@TableField( "avatar")
	private String avatar;

	@TableField( "createBy")
	private Integer createBy;

	@TableField( value = "createTime")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	@TableField( "updateBy")
	private String updateBy;

	@TableField(value = "updateTime")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updateTime;

	@TableField( "delFlag")
	private DelEnum delFlag;


	@TableField("balance")
	private BigDecimal balance;

	@TableField("education")
	private EducationEnum education;

	@TableField("startWordTIme")
	private Date startWordTIme;

	@TableField("birthdate")
	private Date birthdate;

	@TableField("location")
	private String location;


	@TableField("`desc`")
	private String desc;




}
